<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <%@ include file="/static/web/jsp/include.jsp"%>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>我的-收货地址</title>
    <meta name="description" content="网站描述" />
    <meta name="keywords" content="关键词" />
    <link rel="stylesheet" href="${path}/static/web/style/style.css">
    <link rel="stylesheet" href="${path}/static/web/style/hizoom.css">
    <link rel="stylesheet" href="${path}/static/web/style/page_nav.css">
    <link rel="stylesheet" href="${path}/static/web/style/art.css">
</head>
<body>
    <!-- 导航 -->
    <%@ include file="/static/web/jsp/top.jsp"%>

    <div id="addressController" v-cloak>
        <!-- 详情内容 -->
        <div class="model_container">
            <div class="link_sprite">当前位置：<a href="">首页</a> &#155; <a href="">个人中心</a> &#155; <a href="">收货地址</a></div>

            <div class="model_container clearfix">
                <!-- 我的中心导航 -->
                <%@ include file="/static/web/jsp/mine_nav.jsp"%>

                <!-- 右侧内容区 -->
                <div class="mine_aside">

                    <div class="block_box box_shadow">
                        <div class="address_wrap" @click="show(true)">
                            <a class="add_address" href="javascript:void(0);"><i class="icon icon_add_btn"></i>新增收货地址</a>
                        </div>

                        <div class="address_list">
                            <ul>
                                <li class="address_single" v-for="item in list">
                                    <p class="name">{{item.name}}</p>
                                    <p class="phone">{{item.phone}}</p>
                                    <div class="controls">
                                        <div class="control_btns">
                                            <a class="edit_address" href="javascript:void(0);" @click="editAddress(item)">修改</a>|
                                            <a class="del_address" href="javascript:void(0);" @click="delAddress(item)">删除</a>
                                        </div>
                                        <div class="control_choose" v-if="item.is_default == 1">
                                            <a href="javascript:void(0);" class="btn btn_default_red">默认地址</a>
                                        </div>
                                        <div class="control_choose" v-if="item.is_default == 0" @click="setDefAddress(item)">
                                            <a href="javascript:void(0);" class="btn btn_default_gray">设为默认</a>
                                        </div>
                                    </div>
                                    <p class="address">{{item.area}}{{item.address}}</p>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>

          <!-- 修改地址 -->
        <div class="art_model address_model"  :style="{'display':showAddress?'block':'none'}">
            <div class="model_wrap">
                <div class="model_header">
                    <div class="head_title">地址信息</div>
                    <a class="icon icon_close head_close" href="javascript:void(0);" @click="show(false)"></a>
                </div>
                <div class="art_model_content">
                    <form action="">
                        <div class="model_put"><input type="text" placeholder="请输入联系人" v-model="address.userName"/></div>
                        <div class="model_put"><input type="text" placeholder="请输入手机号" v-model="address.phone"/></div>
                        <div class="model_put"><input type="text" placeholder="请输入所在省市区" id="area" v-model="address.area"/></div>
                        <div class="model_put"><input type="text" placeholder="请输入详细地址" v-model="address.address"/></div>
                    </form>
                </div>
                <div class="model_btn mt_20" @click="addAddress">
                    <a href="javascript:void(0);" class="btn btn_primary">确 定</a>
                </div>
            </div>
        </div>
    </div>

    <!-- 客服 -->
    <%@ include file="/static/web/jsp/footer.jsp"%>

</body>
<%--<script src="${path}/static/web/js/jquery.min.js"></script>--%>
<script src="${path}/static/web/js/art.js"></script>
<script src="${path}/static/web/js/popt.js"></script>
<script src="${path}/static/web/js/cityJson.js"></script>
<script src="${path}/static/web/js/citySet.js"></script>
<script src="${path}/static/web/js/biz/mine_address.js"></script>
<script>

</script>
</html>